Preview
and Overlay Modes
A capture
driver can implement two methods for viewing an incoming video stream: preview
mode and overlay mode. If a capture driver implements both methods, the user
can choose which method to use.
Preview mode
transfers digitized frames from the capture hardware to system memory and then
displays the digitized frames in the capture window by using graphics device
interface (GDI) functions. Applications might decrease the preview rate when
the parent window loses focus, and increase the preview rate when the parent
window gains focus. This action improves general system responsiveness because
the preview operation is processor intensive.
There are
three messages to control the preview operation.
Use the WM_CAP_SET_PREVIEW message to enable or disable
preview mode by sending the (or the capPreview7E6LLE macro) to a capture window.
Use the WM_CAP_SET_PREVIEWRATE message (or the capPreviewRate macro) to set the rate at
which frames are displayed in preview mode
Use the WM_CAP_SET_SCALE message (or the capPreviewScale macro) to enable or
disable scaling of the preview video.
When preview
and scaling are both enabled, the captured video frame is stretched to the
dimensions of the capture window. Enabling preview mode automatically disables
overlay mode.
Overlay mode
is a hardware function that displays the contents of the capture buffer on the
monitor without using CPU resources. You can enable and disable overlay mode by
sending the WM_CAP_SET_OVERLAY
You can also
set the scroll position of the video frame within the client area of the
capture window for preview mode or overlay mode by sending the WM_CAP_SET_SCROLL